package jp.sourceforge.akjrcp.dropsomething.actions;

import java.io.File;

import jp.sourceforge.akjrcp.akj_betas.Akj_betasPlugin;
import jp.sourceforge.akjrcp.dropsomething.DropsomethingAction;
import jp.sourceforge.akjrcp.ffmpeg.FFMpegUtils;
import jp.sourceforge.akjrcp.ffmpeg.SimpleCommandExecuter;
import jp.sourceforge.akjrcp.videotools.VideoToolsSettingPage;

public class IPodAtomicParsleyAction implements DropsomethingAction{

	public void exec(File input,File output) {
		String exe=Akj_betasPlugin.getDefault().getPluginPreferences().getString(VideoToolsSettingPage.PATH_ATOMIC_PARSLEY);
		if(!exe.equals("")){
			String command[]={exe,output.getAbsolutePath(),"--DeepScan","--iPod-uuid","1200","--overWrite"};
			Akj_betasPlugin.getDefault().logPrintln(FFMpegUtils.toPrintCommand(command));
			SimpleCommandExecuter executer =new SimpleCommandExecuter(command);
			executer.setPrinter(Akj_betasPlugin.getDefault().getProcessPrinter());
			executer.execute();
			
		}else{
			Akj_betasPlugin.getDefault().logPrintln("AtomicParsley.exe is not setted");
		}
	}

}
